import request from '@/config/axios'

// 仪器接入数据记录 VO
export interface DeviceAccessDataRecordVO {
  id: number // 主键
  wellCode: string // 井编号
  deviceCode: string // 仪器编号
  dataParams: string // 数据记录
  remark: string // 备注
}

// 仪器接入数据记录 API
export const DeviceAccessDataRecordApi = {
  // 查询仪器接入数据记录分页
  getDeviceAccessDataRecordPage: async (params: any) => {
    return await request.get({ url: `/base/device-access-data-record/page`, params })
  },

  // 查询仪器接入数据记录详情
  getDeviceAccessDataRecord: async (id: number) => {
    return await request.get({ url: `/base/device-access-data-record/get?id=` + id })
  },

  // 新增仪器接入数据记录
  createDeviceAccessDataRecord: async (data: DeviceAccessDataRecordVO) => {
    return await request.post({ url: `/base/device-access-data-record/create`, data })
  },

  // 修改仪器接入数据记录
  updateDeviceAccessDataRecord: async (data: DeviceAccessDataRecordVO) => {
    return await request.put({ url: `/base/device-access-data-record/update`, data })
  },

  // 删除仪器接入数据记录
  deleteDeviceAccessDataRecord: async (id: number) => {
    return await request.delete({ url: `/base/device-access-data-record/delete?id=` + id })
  },

  // 导出仪器接入数据记录 Excel
  exportDeviceAccessDataRecord: async (params) => {
    return await request.download({ url: `/base/device-access-data-record/export-excel`, params })
  },
}
